package com.atguigu.mybatisplus.mapper;

import com.atguigu.mybatisplus.model.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    /**
     * 根据角色ID查询菜单ID列表
     * @param roleId
     * @return
     */
    @Select("select menu_id from sys_role_menu where role_id = #{roleId}")
    List<Integer> selectMenuIdsByRoleId(Long roleId);
}
